package com.s2015.doors.web.controller;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.s2015.doors.service.TestService;

@Controller
public class IndexController {
	@Autowired
	private TestService testService = null;

	@RequestMapping("/index")
	public void showArticle(HttpServletResponse resp){
		PrintWriter w = null;
		try {
			w = resp.getWriter();
		} catch (IOException e) {
			e.printStackTrace();
		}
		w.println(" ok!!!!!!!!!");
		w.println(testService.selectUser("1"));
		w.flush();
	}
	
	public TestService getTestService() {
		return testService;
	}

	public void setTestService(TestService testService) {
		this.testService = testService;
	}
	
}
